package com.ld.security.common.mybatis.base.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.core.base.column.ListString;
import com.ld.security.common.core.base.entity.ETreeEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 针对树列表用
 * @param <E>
 */

@Data
public abstract class TreeEntity<E extends TreeEntity<E>> extends SuperEntity implements ETreeEntity<E> {

	@ApiModelProperty("标题")
	@SqlKey(SqlCondition.like)
	private String label;

	@ApiModelProperty("父路径")
	@SqlKey(SqlCondition.like_right)
	private ListString parentPath;


	@ApiModelProperty(value = "子集合",hidden = true)
	@TableField(exist = false)
	private List<E> children;


}
